﻿@using HentaiBlazor.Data.Comic
@using HentaiBlazor.Ezcomp

@inherits DrawerTemplate<string, string>

<Descriptions Column="1" Bordered>
    <DescriptionsItem Title="路径">
        @bookEntity.Path
    </DescriptionsItem>
    <DescriptionsItem Title="文件">
        @bookEntity.Name
    </DescriptionsItem>
    <DescriptionsItem Title="作者">
        @bookEntity.Author
    </DescriptionsItem>
    <DescriptionsItem Title="语言">
        <TextLanguage Language="@bookEntity.Language" />
    </DescriptionsItem>
    <DescriptionsItem Title="标签">
        @foreach (var item in bookTagEntities)
        {
            <Tag @key="item" Color="orange-inverse" OnClose="() => OnTagClose(item.Id)" Mode="closeable">@item.TagName</Tag>
        }
        @if (tagEdit)
        {
            <Input Style="width: 78px" Size="@InputSize.Small" @bind-Value="TagName" OnBlur="OnTagEdit" OnPressEnter="OnTagEdit" AutoFocus />
        }
        else
        {
            <Tag Class="site-tag-plus" OnClick="OpenTagEdit">
                <Icon Type="plus" />
            </Tag>
        }
    </DescriptionsItem>
    <DescriptionsItem Title="最爱">
        <IconFavorite OnClick="OnFavorite" Favorite="@bookEntity.Favorite" />
    </DescriptionsItem>
    <DescriptionsItem Title="大小">
        <TextFileLength FileLength="@bookEntity.Length" />
    </DescriptionsItem>
    <DescriptionsItem Title="页数">
        @bookEntity.Count
    </DescriptionsItem>
    <DescriptionsItem Title="备注">
        @bookEntity.Note
    </DescriptionsItem>
    <DescriptionsItem Title="创建时间">
        @bookEntity.XInsert_
    </DescriptionsItem>
</Descriptions>
